import glob
import os.path

import cv2
import numpy as np


# path = "/home/jiayu/Desktop/嘉伟/20220325/"
#
# for file in glob.glob(os.path.join(path, '*')):
#     basename = os.path.basename(file)
#     img = cv2.imread(file, flags=-1)
#     img = (img * 255).astype(np.uint8)
#
#
#
#     cv2.imwrite("/home/jiayu/Desktop/嘉伟/" + basename, img)

path = "/home/jiayu/Desktop/Jimmy/1219(分六组)/801-1000(enh)/"

for file in glob.glob(os.path.join(path, '*')):
    basename = os.path.basename(file)
    img = cv2.imread(file, flags=0)
    cv2.imwrite("/home/jiayu/Desktop/Jimmy/1219(分六组)/801-1000(enh8)/"+ basename, img)
